@echo off
chcp 65001
color a
title MAKE PARTITION SQL

set /p tableName=请输入要处理的表名:
set /p fieldName=请输入分区的列名:
set /p partFlag=请输入分区规则,按天输入D,按月输入M,按年输入Y:

set currentBatPath=%cd%
echo 当前脚本所在目录为:%currentBatPath%

cd source
set sqlconfigPath=%cd%\sqlConfig.properties
echo 配置文件路径为:%sqlconfigPath%

java -jar makeSql-1.0-SNAPSHOT.jar %sqlconfigPath% %tableName% %partFlag% %fieldName% > %currentBatPath%\%tableName%-%fieldName%-%partFlag%-part.txt
pause